package com.better.common.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 统一返回结果类
 * Created by Administrator on 2017/11/4.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("统一返回结果信息")
public class ServiceResponse<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    /** @Field success 成功状态 */
    @ApiModelProperty(value = "成功状态",required=true)
    private boolean success;

    /** @Field code 状态码 */
    @ApiModelProperty(value = "状态码",required=true)
    public String code;

    /** @Field msg 消息 */
    @ApiModelProperty(value = "状态码")
    public String messages;

    /** @Field data 数据 */
    @ApiModelProperty(value = "数据")
    public T data;

}
